package com.ztjy.statis.biz.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ztjy.bean.FirmStatis;
import com.ztjy.statis.biz.FirmStatisBiz;
import com.ztjy.statis.dao.FirmStatisDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FirmStatisBizImpl implements FirmStatisBiz {
    @Autowired
    private FirmStatisDao firmdao;

    @Override
    public PageInfo<FirmStatis> findAllFirmStatis(FirmStatis firmStatis, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<FirmStatis> allFirmStatis = firmdao.findAllFirmStatis(firmStatis);
        PageInfo<FirmStatis> pageInfo=new PageInfo<FirmStatis>(allFirmStatis);
        return pageInfo;
    }

    @Override
    public PageInfo<FirmStatis> findFirmStatisById(Integer id, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<FirmStatis> firmstatisById = firmdao.findFirmstatisById(id);
        PageInfo<FirmStatis> pageInfo=new PageInfo<FirmStatis>(firmstatisById);
        return pageInfo;
    }

    @Override
    public List<FirmStatis> findbingzhuangtu() {
        return firmdao.findbingzhuangtu();
    }
}
